package cn.kingyang.yiyi.mvp.model.biz;
/////////////////////////////////////////////////////////////////
//                          _ooOoo_                            //
//                         o8888888o                           //
//                         88" . "88                           //
//                         (| ^_^ |)                           //
//                         O\  =  /O                           //
//                      ____/`---'\____                        //
//                    .'  \\|     |//  `.                      //
//                   /  \\|||  :  |||//  \                     //
//                  /  _||||| -:- |||||-  \                    //
//                  |   | \\\  -  /// |   |                    //
//                  | \_|  ''\---/''  |   |                    //
//                  \  .-\__  `-`  ___/-. /                    //
//                ___`. .'  /--.--\  `. . ___                  //
//              ."" '<  `.___\_<|>_/___.'  >'"".               //
//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |              //
//            \  \ `-.   \_ __\ /__ _/   .-` /  /              //
//      ========`-.____`-.___\_____/___.-`____.-'========      //
//                           `=---='                           //
//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      //
//    Code is far away from bug with the buddha protecting!    //
/////////////////////////////////////////////////////////////////

import java.util.ArrayList;
import java.util.List;

import cn.kingyang.yiyi.R;
import cn.kingyang.yiyi.mvp.model.bean.Forum;
import cn.kingyang.yiyi.mvp.model.bean.HomeInfo;
import cn.kingyang.yiyi.mvp.model.bean.HttpData;
import cn.kingyang.yiyi.mvp.model.bean.NobleVideo;
import cn.kingyang.yiyi.mvp.model.bean.Version;
import cn.kingyang.yiyi.mvp.model.service.StaticService;
import cn.kingyang.yiyi.retrofit.helper.RetrofitHelper;
import io.reactivex.Flowable;

/**
 * Created by KingYang on 2017/2/26.
 * E-Mail: admin@kingyang.cn
 */
public class AppModel {
    List<Forum> ForumInfo;
    public AppModel(){
        //论坛板块
        ForumInfo=new ArrayList<>();
        ForumInfo.add(new Forum(R.drawable.test,"求片交流区","各种影片需求，都可以寻求帮助"));
        ForumInfo.add(new Forum(R.drawable.test,"自拍偷拍区","各种门事件，各种自拍偷拍"));
        ForumInfo.add(new Forum(R.drawable.test,"童颜巨乳区","不解释，你懂得"));
        ForumInfo.add(new Forum(R.drawable.test,"制服诱惑区","不解释，你懂得"));
        ForumInfo.add(new Forum(R.drawable.test,"高清素颜区","各种颜值爆表，高清震慑眼球"));
        ForumInfo.add(new Forum(R.drawable.test,"岛国明星区","各种番号大集聚"));
        ForumInfo.add(new Forum(R.drawable.test,"成人动漫区","各种h漫大集聚"));
        ForumInfo.add(new Forum(R.drawable.test,"迅雷下载区","不解释你懂得"));
        ForumInfo.add(new Forum(R.drawable.test,"高清种子区","bt时代，畅快分享"));
        ForumInfo.add(new Forum(R.drawable.test,"网盘分享区","云时代_共分享"));
        ForumInfo.add(new Forum(R.drawable.test,"磁力链接区","不解释，你懂得"));
        ForumInfo.add(new Forum(R.drawable.test,"贴图分享区","高清图片，推女郎系列"));
    }
    public Flowable<HttpData<Version>> checkVersion(int code) {
        StaticService service = RetrofitHelper.getInstance().getRetrofit().create(StaticService.class);
        return service.version(code);
    }
    public Flowable<HttpData<HomeInfo>> getHomeInfo() {
        StaticService service = RetrofitHelper.getInstance().getRetrofit().create(StaticService.class);
        return service.gethome();
    }
    public Flowable<HttpData<List<NobleVideo>>> getNobleInfo() {
        StaticService service = RetrofitHelper.getInstance().getRetrofit().create(StaticService.class);
            return  service.getnoble();
    }
    public Flowable<HttpData<List<NobleVideo>>> getForum() {
        StaticService service = RetrofitHelper.getInstance().getRetrofit().create(StaticService.class);
        return  service.getforum();
    }
    public Flowable<HttpData<List<NobleVideo>>> Search(String Title) {
        StaticService service = RetrofitHelper.getInstance().getRetrofit().create(StaticService.class);
        return  service.search(Title);
    }
    public List<Forum> getForumInfo(){
        return ForumInfo;
    }
}
